import gdata.docs.data
import gdata.docs.client
import gdata.spreadsheet.service
import sys

c = gdata.spreadsheet.service.SpreadsheetsService()
client = gdata.docs.client.DocsClient()
client.ssl = True
c.email = 'science.uoit@gmail.com'
c.password = sys.argv[1]
c.ProgrammaticLogin()
client.ClientLogin(email='science.uoit@gmail.com',
                   password=sys.argv[1],
                   source="uoit-pages")

## List the folders

feed = client.GetDocList(uri="/feeds/default/private/full/-/folder")
for f in feed.entry:
  if f.title.text.startswith("pages - "): print f.title.text
